<?php

include 'config.inc.php';
include _ITSTOCK_LIB_DIR_.'common.inc.php';

itstock_session_start();

if (isset($_GET["logout"])) {
    itstock_logout();
}

if (empty($_SESSION) || !itstock_valid_login($_SESSION['user'])) {
    header("Location: index.php");
} else {
    header("Location: main.php");
}
?>
